/**
 * Copyright (c) 2012 Nokia Corporation. 
 */

package com.nokia.example.tictactoe.engine;

/**
 * Game manager interface.
 */
public abstract class AbstractGameManager {
	// Constants
	public static final int BASIC = 0;
	public static final int NETWORK = 1;
	
	// Members
	protected boolean _gameOngoing = false;
	
	/**
	 * Starts a new game.
	 */
	public abstract void startGame();
	
	/**
	 * Ends the game.
	 */
	public abstract void endGame();
	
	/** 
	 * @return True if the game is ongoing, false otherwise.
	 */
	public boolean gameOngoing() {
		return _gameOngoing;
	}
	
	/**
	 * Takes the appropriate actions when a square at the given coordinates is
	 * pressed.
	 * @param x X coordinate
	 * @param y Y coordinate
	 */
	public abstract void onSquarePressed(int x, int y);
	
	/**
	 * Takes the appropriate actions when the game ends.
	 */
	public abstract void onGameOver();
	
	/**
	 * @return The type of the game manager instance.
	 */
	public abstract int type();
}
